﻿using AutoMapper;
using TaskProject.Application.Command.BOM;
using TaskProject.Application.Command.Plan;
using TaskProject.Application.Command.Production;
using TaskProject.Domain.BOM;
using TaskProject.Domain.Plan;
using TaskProject.Domain.Production;
using TaskProject.Extension.Plan;

namespace TaskProject
{
    public class MyMapper : Profile
    {
        public  MyMapper()
        {
            CreateMap<AddBOMCommand,BOMModel>().ReverseMap();
            CreateMap<UpdateBOMCommand, BOMModel>().ReverseMap();

            CreateMap<AddWorkOrderCommand, WorkorderModel>().ReverseMap();
            CreateMap<AddProductionItemCommand, ProductItemModel>().ReverseMap();
            CreateMap<AddProductProcessCommand, ProductProcessModel>().ReverseMap();
            
            // 生产计划映射
            CreateMap<AddProductionPlanCommand, ProductionPlanModel>().ReverseMap();
            CreateMap<UpdateProductionPlanCommand, ProductionPlanModel>().ReverseMap();
            CreateMap<ProductionPlanModel, ProductionPlanDTO>().ReverseMap();
            CreateMap<ProductionPlanModel, ProductionPlanDetailDTO>().ReverseMap();
            CreateMap<ProductionPlanItemModel, ProductionPlanItemDTO>().ReverseMap();
            CreateMap<ProductionPlanAttachmentModel, ProductionPlanAttachmentDTO>().ReverseMap();
            CreateMap<ProductionPlanOperationLogModel, ProductionPlanOperationLogDTO>().ReverseMap();
            CreateMap<ProductionPlanItemModel, ProductionPlanItemDTO>().ReverseMap();
            CreateMap<ProductionPlanAttachmentModel, ProductionPlanAttachmentDTO>().ReverseMap();
        }

    }
}
